<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        {{count}}
        <button @click="changeCount">点击+1</button>
        <button @click="changeCount1">点击-1</button>

        
    </div>
</body>
</html>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            count:1
        },
        methods:{
            changeCount:function(){
                this.count +=1
            },
            changeCount1(){
                this.count -=1
            }
        }
    })
</script>